/*
 * =====================================================================================
 * Copyright (C) 2023 Ingenic Semiconductor Co.,Ltd
 * All Rights Reserved
 *
 * Filename     : mutex.h
 * Author       : Keven <keven.ywhan@ingenic.com>
 * Created      : 2024/06/19 11:47
 * Description  :
 *
 * =====================================================================================
 */

#ifndef __MUTEX_H__
#define __MUTEX_H__

#include "FreeRTOS.h"
#include "semphr.h"
#include "queue.h"

struct mutex {
	SemaphoreHandle_t mutex;
};

void mutex_init(struct mutex *lock);
void mutex_destroy(struct mutex *lock);
void mutex_lock(struct mutex *lock);
void mutex_unlock(struct mutex *lock);

#endif /* __MUTEX_H__ */

